package strategy.promotion;

/**
 * 用户直接将所选择的优惠的key传过来，我们就能直接根据其返回一个对应的策略去处理。
 */
public class PromotionStrategyTest2 {
    public static void main(String[] args) {
        String key="COUPON";
        PromotionStrategy couponStrategy = PromotionStrategyFactory.getStrategy(key);
        couponStrategy.doPromation();
    }
}
